<template>
<div>
  <p ref="pRef">{{message}}</p>
  <button @click="message='尚硅谷可以提供优质的互联网技术培训'">更新内容</button>
</div>
</template>
<script>
export default{
  data(){
  	return {
  	  message:"欢迎来到尚硅谷",
  	}
  },
  beforeCreate(){
  	console.log("beforeCreate",this.message,this.$refs.pRef)
  },
  created(){
  	console.log("created",this.message,this.$refs.pRef)
  },
  beforeMount(){
  	console.log("beforeMount",this.message,this.$refs.pRef)
  },
  mounted(){
  	console.log("mounted",this.message,this.$refs.pRef)
  },
  beforeUpdate(){
  	console.log("beforeUpdate")
  },
  updated(){
  	console.log("updated")
  },
  beforeUnmount(){
  	console.log("beforeUnmounted",this.$refs.pRef)
  },
  unmounted(){
  	console.log("unmounted",this.$refs.pRef)
  },
}
</script>